@extends(layout, title: "My Profile")
@args User result
<table>
  <tbody>
  @def row(String prop) {
    @row(prop, prop, false)
  }
  @def row(String prop, String label) {
    @row(prop, label, false)
  }
  @def row(String prop, String label, boolean url) {
    @{
      Object val = result.getValue(prop)
    }
    @if(val) {
    <tr>
      <td>@(label):&nbsp;&nbsp;&nbsp;</td>
      <td>
        @if(url) {
        <a href="@val">@val</a>
        } else {
        @val
        }
      </td>
    </tr>
    }
  }
  @row("fullName")
  @row("email")
  @row("company")
  @row("location")
  @row("html_url", "github url", true)
  @row("following")
  @row("followers")
  @row("bio", "description")
  @row("updated_at", "updated")
  @row("created_at", "created")
  </tbody>
</table>
